CODEGEN-759: Update @graphql-codegen/graphql-request peerDep version to 7.0.0#1106
CODEGEN-759: Update @graphql-codegen/graphql-request peerDep version to 7.0.0#1106
Conversation
🦋 Changeset detectedLatest commit: 776569a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-codegen/c-sharp |
5.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/c-sharp-common |
1.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/c-sharp-operations |
3.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/flutter-freezed |
4.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/flow |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/flow-operations |
3.0.2-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/flow-resolvers |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/java-apollo-android |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/java-common |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/java |
4.0.2-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/kotlin |
3.0.2-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/java-resolvers |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/hasura-allow-list |
3.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/jsdoc |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/urql-introspection |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-apollo-angular |
4.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-apollo-client-helpers |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-enum-array |
3.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-generic-sdk |
4.0.2-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-graphql-apollo |
2.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-graphql-files-modules |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-graphql-request |
6.2.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-jit-sdk |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-mongodb |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-msw |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/named-operations-object |
3.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-nest |
1.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-nhost |
0.0.3-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-oclif |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-react-apollo |
4.3.3-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-react-offix |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-react-query |
6.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-rtk-query |
3.1.2-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-solid-query |
1.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-stencil-apollo |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-type-graphql |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-urql |
4.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-urql-graphcache |
3.1.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/urql-svelte-operations-store |
2.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-vue-apollo |
4.1.2-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-vue-apollo-smart-ops |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-vue-urql |
3.2.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/import-types-preset |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/near-operation-file-preset |
3.0.1-alpha-20250526095640-776569a64156c1ae2a72755f5c40fe654aaa6e39 |
npm ↗︎ unpkg ↗︎ |
| ...(CI || !projectMode ? {} : { displayName: pkg.name.replace('@graphql-codegen/', '') }), | ||
| transform: { '^.+\\.tsx?$': 'babel-jest' }, | ||
| transform: { '^.+\\.[tj]sx?$': 'babel-jest' }, | ||
| transformIgnorePatterns: ['/node_modules/(?!(graphql-request)/)'], |
There was a problem hiding this comment.
This is required because we use [email protected] in dev to run jest, which uses ESM. Jest can only run CJS by default.
Since graphql-request is ESM, we need to run it through babel-jest:
transformIgnorePatternsis used to tell Jest to transformgraphql-requestinnode_modules(node_modulesare ignored by default)transformtells Jest to runbabel-jeston.jsfiles ingraphql-requestto turn ESM to CJS
| "@graphql-tools/schema": "10.0.23", | ||
| "graphql-request": "6.0.0" | ||
| "graphql-request": "7.1.2", | ||
| "node-fetch": "2.7.0" |
There was a problem hiding this comment.
graphql-request@6 uses cross-fetch, whilst graphql-request@7 uses native fetch (undici)
undici is built in a way that nock@14 and below does not support (support is coming in nock v15)
So, for tests to work, we need to pass a fetch function that nock supports, because mockGraphQLServer from @graphql-codegen/testing is using [email protected]
923c881 to
f6bde1e
Compare
ede7321 to
a4e44f4
Compare
a4e44f4 to
37f544b
Compare
| // @ts-ignore | ||
| if (!OperationTypeNode) { | ||
| // `OperationTypeNode` is a type in `graphql@15`, but it is a native TS enum in `graphql@16`. | ||
| // `graphql-request@7` uses `OperationTypeNode` enum to analyse document. | ||
| // So, `graphql-request@7` does not work with `graphql@15`. | ||
| // | ||
| // This block is a hacky way to skip running this test for `graphql@15`. | ||
| return; | ||
| } |
There was a problem hiding this comment.
Hi @dotansimha , @jasonkuhrt,
For [email protected]:
I observe [email protected] doesn't work with graphql@15 because of the way it uses OperationTypeNode:
I'm thinking we could update graphql-request@7 package to drop graphql@15 as peerDep, but looks like graffle is under development, so don't know what the effort to release v7.1.3 is ? Or whther it's possible? 🤔
For this plugin:
This hack is a bit gross but I couldn't find a quick way to stop testing graphql@15 just for this plugin. One way I could think of is to split the test command to have control over which packages to test, and split graphql-request CLI into another CI step.
Keen to hear if you have preferences or ideas!
There was a problem hiding this comment.
Hey @eddeee888 I could make a release to do what you are suggesting by easily. We have a branch called legacy for just this kind of reason.
Do you want to make a PR to it and we can discuss further?
There was a problem hiding this comment.
Ah good to know about the legacy branch! I think I can make a PR to that branch tonight
There was a problem hiding this comment.
Yay, new graphql-request version works. Hack removed. I can live with my conscience 😆
Thank you!
Description
Related #743
Type of change
Please delete options that are not relevant.